//#include "stdafx.h" 
#include <iostream> 
using namespace std;

class pos {
	double x, y;
public:
	pos(double xx, double yy) {
		x = xx;
		y = yy;
	}
	pos() {};
	void getD() {
		cout << "x=" << x << " " << "y=" << y << endl;
	}
};
class MyClass {
	double radius, rote;
	pos Pos;
public:
	MyClass(double xx, double roter) {
		if (xx < 0) {
			cout << "Wrong input" << endl;
		}
		else {
			radius = xx;
			rote = roter;
			Pos = setDec();
		}
	}
	pos setDec() {
		if (radius>0)
			return pos(radius*cos(rote), radius*sin(rote));
	}
	void getDec() {
		if (radius>0)
			Pos.getD();
	}
};

int main()
{
	MyClass p(-1, 365);
	p.getDec();
	system("pause");
	return 0;
}